package com.ruoyi.deal.service.impl;

import java.util.List;

import com.ruoyi.deal.domain.CcsGoodsComment;
import com.ruoyi.deal.mapper.CcsGoodsCommentMapper;
import com.ruoyi.deal.service.ICcsGoodsCommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 评价Service业务层处理
 *
 * @author ruoyi
 * @date 2024-10-17
 */
@Service
public class CcsGoodsCommentServiceImpl implements ICcsGoodsCommentService
{
    @Autowired
    private CcsGoodsCommentMapper ccsGoodsCommentMapper;

    /**
     * 查询评价
     *
     * @param id 评价主键
     * @return 评价
     */
    @Override
    public CcsGoodsComment selectCcsGoodsCommentById(Long id)
    {
        return ccsGoodsCommentMapper.selectCcsGoodsCommentById(id);
    }

    /**
     * 查询评价列表
     *
     * @param ccsGoodsComment 评价
     * @return 评价
     */
    @Override
    public List<CcsGoodsComment> selectCcsGoodsCommentList(CcsGoodsComment ccsGoodsComment)
    {
        return ccsGoodsCommentMapper.selectCcsGoodsCommentList(ccsGoodsComment);
    }

    /**
     * 新增评价
     *
     * @param ccsGoodsComment 评价
     * @return 结果
     */
    @Override
    public int insertCcsGoodsComment(CcsGoodsComment ccsGoodsComment)
    {
        return ccsGoodsCommentMapper.insertCcsGoodsComment(ccsGoodsComment);
    }

    /**
     * 修改评价
     *
     * @param ccsGoodsComment 评价
     * @return 结果
     */
    @Override
    public int updateCcsGoodsComment(CcsGoodsComment ccsGoodsComment)
    {
        return ccsGoodsCommentMapper.updateCcsGoodsComment(ccsGoodsComment);
    }

    /**
     * 批量删除评价
     *
     * @param ids 需要删除的评价主键
     * @return 结果
     */
    @Override
    public int deleteCcsGoodsCommentByIds(Long[] ids)
    {
        return ccsGoodsCommentMapper.deleteCcsGoodsCommentByIds(ids);
    }

    /**
     * 删除评价信息
     *
     * @param id 评价主键
     * @return 结果
     */
    @Override
    public int deleteCcsGoodsCommentById(Long id)
    {
        return ccsGoodsCommentMapper.deleteCcsGoodsCommentById(id);
    }
}
